<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>输入法</title>
	<style>
	 #box{width: 200px;
        margin:0 auto;
	 }
	 .C{
	 	width: 50px;
	 	display: none;
     }

	</style>
	<script>
	   
		window.onload = function(){
        var node=document.getElementsByTagName("input")
	    var node1= document.getElementById("W")
	    var node2= document.getElementsByClassName("C")

            node[0].onclick=function(){
            	// alert("Hey")
            	node2[0].style.display= node2[0].style.display=='block'?"none":"block"
            }
           // var node1= document.getElementById("W")
            node1.onclick=function(){

            	node2[0].style.display="none"
            }
		}
	</script>
</head>
<body>
    <div id="box">
       <input type="button" value="输入法">
       <div class="C">

       	<p><a href="javascript:;">手写</a></p>
       	<p><a href="javascript:;">拼音</a></p>
       	<p id="W"><a href="javascript:;">关闭</a></p>
       </div>
       
    	
    </div>
	
</body>
</html>